package com.oig.sys.base.constants;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;

public class SysBaseEnum {

    /**
     * 0-洲 1-国家地区 2-城市
     */
    public enum AreaType {
        LAND("0","洲"),
        COUNTRY("1","国家地区"),
        CITY("2","城市")
        ;
        private final String code;
        private final String name;

        public String getCode() {
            return code;
        }
        public String getName() {
            return name;
        }

        AreaType(String code, String name){
            this.code = code;
            this.name = name;
        }

        public static boolean validCode(String code) {
            for (AreaType enumItems : AreaType.values()) {
                if (enumItems.getCode().equals(code)) {
                    return true;
                }
            }
            return false;
        }

    }


    public enum GradeType{
        COUNTRY(0,"国家地区"),
        PROVINCE(1, "省"),
        CITY(2, "市"),
        AREA(3, "区/县"),
        ;
        private final Integer code;
        private final String name;

        public Integer getCode() {
            return code;
        }
        public String getName() {
            return name;
        }

        GradeType(Integer code, String name){
            this.code = code;
            this.name = name;
        }

        public static boolean validCode(Integer code) {
            for (GradeType enumItems : GradeType.values()) {
                if (enumItems.getCode().equals(code)) {
                    return true;
                }
            }
            return false;
        }
    }



    /**
     * 汇率类型枚举
     */
    public enum CurrRateType {
        /**
         *
         */
        PUNCTUAL("0", "实时"),
        /**
         *
         */
        CUSTOMS("1", "海关"),
        ;
        private final String code;
        private final String name;

        public String getCode() {
            return code;
        }

        public String getName() {
            return name;
        }

        CurrRateType(String code, String name) {
            this.code = code;
            this.name = name;
        }
    }


    /**
     * 境外发货人类型
     */
    @Getter
    @AllArgsConstructor(access = AccessLevel.PRIVATE)
    public enum OverseasSenderType {
        SHIPPER("shipper"),
        SUPPLIER("供应商")
        ;
        private final String desc;
    }


    /**
     * 检疫证要求
     */
    @Getter
    @AllArgsConstructor(access = AccessLevel.PRIVATE)
    public enum QuarantineRequirement {
        ORIGIN("正本齐全"),
        ELC("电子齐全"),
        ORIGIN_OR_ELC("电子或正本齐全"),
        ORIGIN_AND_ELC("电子且正本齐全"),
        ;
        private final String desc;
    }

    @Getter
    @AllArgsConstructor(access = AccessLevel.PRIVATE)
    public enum PrintTemplateType {
        CHECK_BILL("0", "核对单"),
        WWCHECK_BILL("2", "test"),

        ;
        private final String code;
        private final String desc;
    }




}
